@extends('layouts.login')
@section('main')
<div class="row">
    <div class="col-sm-4 col-xs-12 pull-left" id="sidebar" role="navigation">
    </div>
    <div class="col-md-4 col-md-offset-0">
        <div class="row">
            <!-- BEGIN CONTENT -->
            <div class="panel panel-default" style="background-color: #f5f5f5; border-color: #c5c5c5;">
                <div class="panel-heading "><h4><i class="glyphicon glyphicon-cog"></i>&nbsp;Đăng nhập hệ thống</h4></div>
                <div class="panel-body">
                    <img src="{{ url('images/login-user.png') }}" class="img-responsive round-img" style="margin: 20px auto;" />
                    {{ Form::open(array('url'=>'login','method'=>'POST','class'=>'form-signin')) }}
                    {{ Form::token()}}
                    <div class="form-group">
                        {{ Form::text('tai_khoan',Input::old('username'),array('placeholder' => 'Nhập tài khoản của bạn','class'=>'form-control','required'=>'','pattern'=>'[A-Za-z0-9]{3,50}','autofocus')) }}
                    </div>
                    <div class="form-group">
                        {{ Form::input('password','mat_khau',Input::old('mat_khau'),array('placeholder' => 'Nhập mật khẩu của bạn','class'=>'form-control','required'=>'','pattern'=>'.{3,100}')) }}
                    </div>            
                    {{ Form::submit('Đăng nhập', array('class' => 'btn btn-lg btn-primary btn-block')) }}
                    {{ Form::close() }}
                </div>
            </div> <!-- /container -->
            <!-- END CONTENT -->
        </div>
    </div><!--/span-->   
</div>
<!--/row-->
@if(Session::has('error')) 
<script type="text/javascript">
    toastr.error("{{Session::get('error')}}");
</script>
@endif
@if(Session::has('warning')) 
<script type="text/javascript">
    toastr.warning("{{Session::get('warning')}}");
</script>
@endif
@if(Session::has('success')) 
<script type="text/javascript">
    toastr.success("{{Session::get('success')}}");
</script>
@endif
@stop